<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMS</title>
<style type="text/css">
body,form{margin:0;padding:0; font-size:12px; font-family:"宋体",Arial, Helvetica, sans-serif;}
.smsform{ width:361px;height:180px;background:url(images/gz_sms_bg.jpg) no-repeat;margin:0 auto;padding-top:60px;}
.title{height:69px;line-height:31px;color:#fff;font-size:13px;font-weight:bold;text-align:center;}
.smsform ul{ list-style:none; margin:0px;padding:0;margin-top:8px;margin-left:10px;}
.smsform li{margin-bottom:8px; }
a{ color:#000; font-size:12px; text-decoration:none; line-height:26px; font-weight:bold; }
.input_quyu{width:100px;}
.area{height:30px;padding-left:10px;line-height:20px;}
#my_manager {
	height:91px;
	padding:10px 25px 0 65px;
	background:url(images/send_message_bg.jpg) no-repeat left top;

}
#my_manager span {
	color:#e60012;
	font-weight:bold;
}
#my_manager p{
	margin:0px;
	padding:0px;
    line-height:20px;
	font-size:13px;
}

#my_manager a:hover{text-decoration:underline;}
.send_manager_div { 
	padding-left:10px;
	height:30px;
	vertical-align:middle;
	line-height:30px;
	margin-top:5px;
	position:relative;
	
}

.send_phone {width:120px;height:19px;line-height:19px;/*float:left;*/border:1px solid #809dbd;padding-left:3px;	padding-top:2px;margin-top:4px;	display:inline;}
.send_phone_focus {	width:120px;
	height:19px;
	line-height:19px;
	/*float:left;*/
	border:1px solid #004B7D;
	background:#d6e9fb;
	padding-left:3px;
	padding-top:2px;
	margin-top:4px;
}
a.sms_btn {
	font-size:12px;
	text-decoration:none;
	color:#FFF;
	line-height:30px;
	background-color:#676364;
	float:left;width:90px; text-align:center;position:absolute;margin-left:8px;
}
a.sms_btn:hover {
	text-decoration:underline;
	color:#fff;
	background-color:#676364;
}
#sms_return {
	width:245px;
	height:30px;
	color:#e60012;
	font-size:12px;
	float:left;
}
.require_box{ vertical-align:top;margin-top:10px;padding-left:10px;}
.require{width:290px;height:55px;border:1px solid #809dbd;padding-left:3px;padding-top:2px;}
.require_focus{width:290px;height:55px;border:1px solid #004B7D;padding-left:3px;padding-top:2px;background:#d6e9fb;}
</style>
</head>

<body>

<div class="smsform">

<FORM name="Find_Manager"  id="Find_Manager"  method="post" action="api/dosmsapi.php" >
<div class="area"><label>我所在地区：</label>
      <SELECT  class="input_quyu" onchange="getCity(this.options[this.selectedIndex].value, 'city');" id="province" name="province">
        <option value="" selected="selected">请选择</option>
        <option value="北京市">北京市</option>
        <option value="上海市">上海市</option>
        <option value="天津市">天津市</option>
        <option value="重庆市">重庆市</option>
        <option value="河北省">河北省</option>
        <option value="山西省">山西省</option>
        <option value="内蒙古自治区">内蒙古自治区</option>
        <option value="辽宁省">辽宁省</option>
        <option value="吉林省">吉林省</option>
        <option value="黑龙江省">黑龙江省</option>
        <option value="江苏省">江苏省</option>
        <option value="浙江省">浙江省</option>
        <option value="安徽省">安徽省</option>
        <option value="福建省">福建省</option>
        <option value="江西省">江西省</option>
        <option value="山东省">山东省</option>
        <option value="河南省">河南省</option>
        <option value="湖北省">湖北省</option>
        <option value="湖南省">湖南省</option>
        <option value="广东省">广东省</option>
        <option value="广西壮族自治区">广西壮族自治区</option>
        <option value="海南省">海南省</option>
        <option value="四川省">四川省</option>
        <option value="贵州省">贵州省</option>
        <option value="云南省">云南省</option>
        <option value="西藏自治区">西藏自治区</option>
        <option value="陕西省">陕西省</option>
        <option value="甘肃省">甘肃省</option>
        <option value="宁夏回族自治区">宁夏回族自治区</option>
        <option value="青海省">青海省</option>
        <option value="新疆维吾尔族自治区">新疆维吾尔族自治区</option>
        <option value="香港特别行政区">香港特别行政区</option>
        <option value="澳门特别行政区">澳门特别行政区</option>
        <option value="台湾省">台湾省</option>
        <option value="其它">其它</option>
      </SELECT> 省 <SELECT class="input_quyu" id="city" name="city">
          <option value="">请选择</option>
        </SELECT> 市</div>
  <div class="send_manager_div">
  		 <label>快速获取联系方式：</label>
         <input type="text" class="send_phone" name="send_phone" id="send_phone" onfocus="this.className='send_phone_focus';" onblur="this.className='send_phone';"  />
    <a href="javascript:void(0);" class="sms_btn" id="sms_btn" > 点击发送</a></div>
         <div class="require_box">
         	<label style="float:left;display:inline;margin-right:10px;">产品<br />需求</label><textarea name="msg" class="require" onblur="this.className='require'" onfocus="this.className='require_focus'"></textarea>
         </div>
         <div style="position:relative;top:8px;_top:7px;left:130px;width:80px;clear:both;"><input type="image" src="./guizhou/img/zx.jpg" /></div>
          
</FORM>
</div>
<script>
//area_province(0);
</script>   
</script>   
<script language="javascript"> 
		function ReloadCode()
		{
			var dt = new Date();
			//document.getElementById('checkcode2').src = "api/checkcode.php?code="+dt ;
		}
</script> 
<script type="text/javascript">
function mtotel(obj)
{
	//newobj = document.getElementById('tel');
	//newobj.value = obj.value;
}
jQuery(function($){
	//$('#checkcode2').attr('src','api/checkcode.php?'+new Date().getTime());
    $('#sms_btn').bind('click',function(){
        var partten = /^1[3,5,8]\d{9}$/;
        var number = $('#send_phone').val()
        if(!partten.test(number) || number.toString().length==0){
            window.document.Find_Manager.send_phone.focus();
            alert('请正确填写手机号码！');
            return false;
         }
        var data = {};
        if(top == window){
            data.ref = '';
        }else{
            data.ref = window.document.referrer;
        }
        data.province = $('#province').val();
        data.city = $('#city').val();
        data.send_phone = $('#send_phone').val();
        data.type = 1;
          $.ajax({
               type: "POST",
               url: "api/dosmsapi.php",
               data: data,
               success: function(msg){
                    alert(msg);
               }
            });
       
    });
	$('#Find_Manager').bind('submit',function(){		
		/*if (window.document.Find_Manager.uname.value==""){
		alert('姓名呼不能为空！');
		window.document.Find_Manager.uname.focus();
		return false;
		}*/
		var number=window.document.Find_Manager.send_phone.value;
		
		var partten = /^1[3,5,8]\d{9}$/;
		if(!partten.test(number) || number.toString().length==0){
			  window.document.Find_Manager.send_phone.focus();
			  alert('请正确填写手机号码！');
			  return false;
			 }
		
		if(window.document.Find_Manager.msg.value=="")
		{
			alert("产品需求内容不能为空!");
			return false;
			window.document.Find_Manager.msg.focus();
		
		}
		var msg=window.document.Find_Manager.msg.value;  
		var partner=/(S)*(http)|(ftp)|(url)|(www\.)/igm;
		if(partner.exec(msg))
		{
			alert("请不要提交非法字符!");
			return false;
			window.document.Find_Manager.msg.value="";
			window.document.Find_Manager.msg.focus();
		
		}
		/*if(window.document.Find_Manager.checkcode.value=="")
		{
			alert('验证码不能为空！');
			return false;
			
			window.document.Find_Manager.checkcode.focus();
		}
		*/
		
		//验证码
		
		//var mcheckcode = window.document.Find_Manager.checkcode.value;
		
		$.get('api/getcode.php?scode='+mcheckcode,function(d){
			if(1 == d) {				
				var data = {};
				if(top == window){
					data.ref = '';
				}else{
					data.ref = window.document.referrer;
				}
				data.province = $('#province').val();
				data.city = $('#city').val();
				if(result){
				//data.uname = $('#uname').val();
				data.tel = $('#send_phone').val();
				data.msg = $('*[name="msg"]').val();
				//data.checkcode = $('#vdcode2').val();
				data.type = 2;
				$.ajax({
				   type: "POST",
				   url: "api/dosmsapi.php",
				   data: data,
				   success: function(msg){
					 alert(msg);
				   }
				});
				}			
				
			} else {
				//alert('验证码错误');
				//window.document.Find_Manager.checkcode.focus(); 
			}
		});			
		return false;
		//window.document.Find_Manager.reset();		
	});
});
</script>   
</body>
</html>
